package com.smmisia.shop.entity.convetor;

import com.smmisia.shop.entity.Business;
import com.smmisia.shop.response.BusinessInfoResponse;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.factory.Mappers;

@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface BusinessConvertor {

    BusinessConvertor INSTANCE = Mappers.getMapper(BusinessConvertor.class);

    /**
     * 将Business对象转换为BusinessInfoResponse对象
     * @param business
     * @return
     */
    BusinessInfoResponse toBusinessInfo(Business business);
}
